package com.sam.mooc;

import java.util.Arrays;

/**
 * Created by samwang on 2017/11/15.
 */
public class Main {
    public static void main(String[] args) {
        java.util.Scanner in = new java.util.Scanner(System.in);
        Clock clock = new Clock(in.nextInt(), in.nextInt(), in.nextInt());
        clock.tick();
        System.out.println(clock);
        in.close();

        String[] str = new String[10];


        Arrays.sort(str);
    }
}

class Clock {
    Display hour;
    Display minute;
    Display second;

    Clock(int hour, int minute, int second) {
        this.hour = new Display(hour, 24);
        this.minute = new Display(minute, 60);
        this.second = new Display(second, 60);
    }

    public void tick() {
        if (second.increase() == 1) {
            if (minute.increase() == 1) {
                hour.increase();
            }
        }
    }

    @Override
    public String toString() {
        return String.format("%02d:%02d:%02d",hour.value,minute.value,second.value);
    }
}

class Display {
    int value = 0;
    private int limit;

    public Display(int value, int limit) {
        this.value = value;
        this.limit = limit;
    }

    public int increase() {
        this.value++;
        if (value == limit) {
            value -= limit;
            return 1;
        }
        return 0;

    }
}
